import request from './request'
import localReq from './localReq'
import qs from 'qs'
// 用户注册 参数: phone:手机号, nickName:昵称, password:密码 | 请求参数为JSON格式
export const registerApi = params => request.post('/open/register', params);
// 用户登录 参数: phone:手机号, password:密码 | 请求参数为JSON格式
export const loginApi = params => request.post('/login', params);
// -----------------------------个人中心------------------------------
// 获取用户信息详情
export const getUserInfo = params => request.get('/users/info',params);
// 获取用户消息中心的消息
export const getMessage = params => request.get('/api/message',{params});
// -----------------------------物流单------------------------------
// 获取物流单列表
export const getLogisticsBill = (data) => request.get('/api/star',{data});
// -----------------------------送货单------------------------------
// 全部订单
export const getDeliveryFormListApi = params => request.get('/order/v1/list',{params});
// 获取待发货单
export const getToInvoiceListApi = params => request.get('/order/v1/list/1',{params});
// 获取待收货单
export const getForReceiptListApi = params => request.get('/order/v1/list/2',{params});
// 获取待评价单
export const getForEvaluationListApi = params => request.get('/order/v1/list/3',{params});
// 获取订单详情
export const getOrderInfoApi = params => request.get(`/order/v1/orderInfo/${params}`);
// 发货
export const getOrderSendApi = params => request.post(`/order/v1/send`,params);
// 确认收货
export const getOrderTakeApi = params => request.post(`/order/v1/confirmReceipt/${params}`);
// 订单评价
export const getEvaluateApi = data => request.post(`/order/v1/evaluate`,data);
// 评价详情
export const getEvaluateDetailApi = params => request.get(`/order/v1/evaluateInfo/${params}`,);
// -----------------------------我的客户------------------------------
export const getCustApi = params => request.get(`/api/cust`,{params});


// -----------------------------测试本地接口------------------------------
export const test = params => localReq.get(`/test`,{params});
export const addLogistics = params => localReq.post(`/logistics/addLogistics`,params);

